<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<title th:text="${session.title}">123</title>
	<link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/ace-skins.min.css}" />
    <link th:replace="common/tip"/>
</head>
	<body class="navbar-fixed">
  	<div th:replace="common/top"></div>
		<div class="container-fluid main_bg" id="main-container">
			<a id="menu-toggler" href="#"><span></span></a>
			<div th:replace="common/menu"></div>
			<div id="main-content" class="clearfix">
				<div id="page-content" class="clearfix">
					<div th:replace="common/title"></div>
					<h3 class="header smaller lighter blue"><em class="icon-list"></em>球员列表</h3>
					<form class="form-horizontal" th:object="${footPersonSearchForm}" method="post" th:action="@{/foot/footPerson/search}" name="form" th:if="${session.footUser.qx.text == '管理员'}">
					<div class="row-fluid">
						<!--PAGE CONTENT BEGINS HERE-->
						<div class="span12">
                    		<div class="row-fluid">
                        		<a class="btn btn-info" type="button" th:href="@{/foot/footPerson/add}"><em class="icon-plus"></em>添加</a>
                         		<button class="btn btn-danger" type="button" onclick="deleteall('/foot/footPerson/deleteall');"><em class="icon-remove-circle"></em>删除</button>
                         		<a class="btn btn-danger" type="button" th:href="@{/foot/footPerson/importExcel}"><em class="icon-remove-circle"></em>更新球员数据</a>
                         		<a class="btn btn-danger" type="button" th:href="@{/foot/footPerson/importPCardExcel}"><em class="icon-remove-circle"></em>更新球员P卡数据</a>
                         		<a class="btn btn-danger" type="button" th:href="@{/foot/footPerson/importSCardExcel}"><em class="icon-remove-circle"></em>更新球员S卡数据</a>
                          		<a class="btn" type="button" th:href="@{/index}"><em class="icon-arrow-left"></em>返回首页</a>
                        	</div>
                        	<table style="width:100%" border="0">
							    <tbody>
							      	<tr>
								        <th style="width: 150px;">球员名字/ID/俱乐部:</th>
								        <td style="width: auto;"><input th:field="*{name}" type="text" name="name" class="input_fix" placeholder="球员名字/ID/俱乐部"/></td>
										<th style="width: 55px;">位置:</th>
								        <td style="width: auto;">
                                            <select th:field="*{wz}" id="wz" name="wz" class="input_fix" title="">
                                                <option value="">全部</option>
                                                <option th:each="t:${wzList}" th:value="${t.id}" th:text="${t.wzmc + '(' + t.wzbm + ')'}">123</option>
                                            </select>
										</td>
										<th style="width: 55px;">等级:</th>
								        <td style="width: auto;">
                                            <select th:field="*{djId}" id="djId" name="djId" class="input_fix" title="">
                                                <option value="">全部</option>
                                                <option th:each="t:${djList}" th:text="${t.qydj}" th:value="${t.id}">123</option>
                                            </select>
										</td>
                                        <th style="width: 55px;">国籍:</th>
                                        <td style="width: auto;">
                                            <select th:field="*{gj}" id="gj" name="gj" class="input_fix" title="">
                                                <option value="">全部</option>
                                                <option th:each="t:${gjList}" th:text="${t.name}" th:value="${t.id}">123</option>
                                            </select>
                                        </td>
										<td style="width:120px;">
								        	<button type="button" class="btn btn-info" style="float: right;" id="btnmore"><em id="more" class="icon-arrow-down"></em>更多</button>
								        </td>
								        <td style="width:120px;">
								        	<button class="btn btn-info" style="float: right;" type="button" onclick="pagechange(1);"><em class="icon-search"></em>查询</button>
								        </td>
							      	</tr>
							      	<tr>
							      		<table id="table" style="width:100%;display:none;" border="0">
							      			<tr>
							      				<th>
                                                    <select th:field="*{nlName1}" id="nlName1" name="nlName1" class="input_fix" title="">
                                                        <option value="">全部</option>
                                                        <option th:each="t:${nlList}" th:text="${t.name}" th:value="${t.id}">123</option>
                                                    </select>
                                                </th>
										        <td>
													<input th:field="*{nlValueStart1}" type="text" id="nlValueStart1" name="nlValueStart1" class="input-mini spinner-input" title=""/>
										        	~<input th:field="*{nlValueEnd1}" type="text" id="nlValueEnd1" name="nlValueEnd1" class="input-mini spinner-input" title=""/></td>
                                                <th>
                                                    <select th:field="*{nlName2}" id="nlName2" name="nlName2" class="input_fix" title="">
                                                        <option value="">全部</option>
                                                        <option th:each="t:${nlList}" th:text="${t.name}" th:value="${t.id}">123</option>
                                                    </select>
                                                </th>
                                                <td>
                                                    <input th:field="*{nlValueStart2}" type="text" id="nlValueStart2" name="nlValueStart2" class="input-mini spinner-input" title=""/>
                                                    ~<input th:field="*{nlValueEnd2}" type="text" id="nlValueEnd2" name="nlValueEnd2" class="input-mini spinner-input" title=""/></td>
                                                <th>
                                                    <select th:field="*{nlName3}" id="nlName3" name="nlName3" class="input_fix" title="">
                                                        <option value="">全部</option>
                                                        <option th:each="t:${nlList}" th:text="${t.name}" th:value="${t.id}">123</option>
                                                    </select>
                                                </th>
                                                <td>
                                                    <input th:field="*{nlValueStart3}" type="text" id="nlValueStart3" name="nlValueStart3" class="input-mini spinner-input" title=""/>
                                                    ~<input th:field="*{nlValueEnd3}" type="text" id="nlValueEnd3" name="nlValueEnd3" class="input-mini spinner-input" title=""/></td>
                                                <th>
                                                    <select th:field="*{nlName4}" id="nlName4" name="nlName4" class="input_fix" title="">
                                                        <option value="">全部</option>
                                                        <option th:each="t:${nlList}" th:text="${t.name}" th:value="${t.id}">123</option>
                                                    </select>
                                                </th>
                                                <td>
                                                    <input th:field="*{nlValueStart4}" type="text" id="nlValueStart4" name="nlValueStart4" class="input-mini spinner-input" title=""/>
                                                    ~<input th:field="*{nlValueEnd4}" type="text" id="nlValueEnd4" name="nlValueEnd4" class="input-mini spinner-input" title=""/></td>
							      			</tr>
							      		</table>
							      	</tr>
							  	</tbody>
							</table>
                    		<table id="table_bug_report" class="table table-hover">
								<thead>
									<tr>
										<th class="center" style="width:60px;"><label><a onclick="selectAll(this)">全/不选</a></label></th>
										<th style="width:40px;">位置</th>
										<th>球员名称</th>
								        <th style="width:120px;">等级</th>
								        <th style="width:120px;">国籍</th>
								        <th class="hidden-480" style="width:40px;">评分</th>
								        <th style="width:80px;">身价</th>
								        <th style="width:200px;">球员状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr th:each="t:${footPersonList}">
										<td class="center"><label><input type="checkbox" name="selectIds" th:value="${t.id}"/><span class="lbl">&nbsp;</span></label></td>
										<td><a th:onclick="'javascript:view(' + ${t.id} + ');'">
                                            <img alt="" src="" th:src="@{/images/foot/gk.png}" th:if="${t.wzbm == 'GK'}"/>
                                            <img alt="" src="" th:src="@{/images/foot/sw.png}" th:if="${t.wzbm == 'SW'}"/>
                                            <img alt="" src="" th:src="@{/images/foot/cb.png}" th:if="${t.wzbm == 'CB'}" />
                                            <img alt="" src="" th:src="@{/images/foot/lb.png}" th:if="${t.wzbm == 'LB'}" />
                                            <img alt="" src="" th:src="@{/images/foot/rb.png}" th:if="${t.wzbm == 'RB'}" />
                                            <img alt="" src="" th:src="@{/images/foot/dmf.png}" th:if="${t.wzbm == 'DMF'}" />
                                            <img alt="" src="" th:src="@{/images/foot/cmf.png}" th:if="${t.wzbm == 'CMF'}" />
                                            <img alt="" src="" th:src="@{/images/foot/lmf.png}" th:if="${t.wzbm == 'LMF'}" />
                                            <img alt="" src="" th:src="@{/images/foot/rmf.png}" th:if="${t.wzbm == 'RMF'}" />
                                            <img alt="" src="" th:src="@{/images/foot/lwf.png}" th:if="${t.wzbm == 'LWF'}" />
                                            <img alt="" src="" th:src="@{/images/foot/rwf.png}" th:if="${t.wzbm == 'RWF'}" />
                                            <img alt="" src="" th:src="@{/images/foot/amf.png}" th:if="${t.wzbm == 'AMF'}" />
                                            <img alt="" src="" th:src="@{/images/foot/ss.png}" th:if="${t.wzbm == 'SS'}" />
                                            <img alt="" src="" th:src="@{/images/foot/cf.png}" th:if="${t.wzbm == 'CF'}" />
								        </a></td>
                                        <td th:if="${t.qydj == '顶级球星'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><span style="color: orange; font-weight: bold" th:text="${t.yw + '(' + t.name + ')'}">123</span></a></td>
                                        <td th:if="${t.qydj == '顶级球星'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em></a></td>
                                        <td th:if="${t.qydj == '超级球星'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><span style="color: purple; font-weight: bold" th:text="${t.yw + '(' + t.name + ')'}">123</span></a></td>
                                        <td th:if="${t.qydj == '超级球星'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em></a></td>
                                        <td th:if="${t.qydj == '洲际球星'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><span style="color: blue; font-weight: bold" th:text="${t.yw + '(' + t.name + ')'}">123</span></a></td>
                                        <td th:if="${t.qydj == '洲际球星'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em></a></td>
                                        <td th:if="${t.qydj == '普通球星'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><span style="color: #9dfe5c; font-weight: bold" th:text="${t.yw + '(' + t.name + ')'}">123</span></a></td>
                                        <td th:if="${t.qydj == '普通球星'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><em class="icon-star text-warning"></em><em class="icon-star text-warning"></em></a></td>
                                        <td th:if="${t.qydj == '大众/白人'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><span style="color: white; font-weight: bold" th:text="${t.yw + '(' + t.name + ')'}">123</span></a></td>
                                        <td th:if="${t.qydj == '大众/白人'}"><a th:onclick="'javascript:view(' + ${t.id} + ');'"><em class="icon-star text-warning"></em></a></td>
                                        <td class="hidden-480"><a th:onclick="'javascript:view(' + ${t.id} + ');'" th:text="${t.gjName}">123</a></td>
                                        <td class="hidden-480"><a th:onclick="'javascript:view(' + ${t.id} + ');'">
                                            <span th:if="${t.pf >= 75 && t.pf < 80}" style="color: 9dfe5c; " th:text="${t.pf}">123</span>
                                            <span th:if="${t.pf >= 80 && t.pf < 90}" style="color: yellow; " th:text="${t.pf}">123</span>
                                            <span th:if="${t.pf >= 90 && t.pf < 95}" style="color: orange; " th:text="${t.pf}">123</span>
                                            <span th:if="${t.pf >= 95}" style="color: red; " th:text="${t.pf}">123</span>
                                            <span th:if="${t.pf < 75}" style="color: white; " th:text="${t.pf}">123</span>
								       	</a></td>
								       	<td><a th:onclick="'javascript:view(' + ${t.id} + ');'" th:text="${#numbers.formatDecimal(t.qysj, 0, 0)}">123</a></td>
								        <td>
											<img alt="" th:src="@{/images/foot/xq.png}" src="" style="height:20px;" th:if="${t.xqzt == 1}"/>
										</td>
										<td><div class="inline position-relative">
											<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
												<em class="icon-cog icon-only bigger-110"></em>
											</button>
											<ul class="dropdown-menu dropdown-icon-only dropdown-light pull-right dropdown-caret dropdown-close">
												<li><a th:href="@{/foot/footPerson/edit(id=${t.id})}" class="tooltip-success" data-rel="tooltip" title="修改" data-placement="left">
													<span class="green"><em class="icon-edit"></em></span></a>
												</li>
                                                <li><a th:href="@{/foot/footPersonSkill/search(id=${t.id})}" class="tooltip-success" data-rel="tooltip" title="查看球员技能" data-placement="left">
                                                    <span class="green"><em class="icon-edit"></em></span></a>
                                                </li>
                                                <li><a class="tooltip-error" data-rel="tooltip" title="删除" data-placement="left" th:onclick="'javascript:deleteById(\'/foot/footPerson/delete?id=\', ' + ${t.id} + ')'"> <span class="red"><em class="icon-remove"></em></span></a> </li>
											</ul>
											</div>
										</td>
									</tr>
								</tbody>
								<tfoot>
							     	<tr>
							        	<td colspan="10">
                                            <div class="row-fluid" th:include="common/page :: page"></div>
							        	</td>
							     	</tr>
								</tfoot>
							</table>
                        	<!--/#page-content-->
						</div>
              			<!--/#page-content-->
					</div>
					</form>
           		</div>
				<div th:replace="common/skin :: skin"></div>
		</div><!--/#main-content-->
	</div><!--/.fluid-container#main-container-->
	<div th:replace="common/jsList"></div>
	<script th:src="@{/js/fuelux/fuelux.spinner.min.js}"></script>
    <script th:src="@{/js/spinbox.min.js}"></script>
	<script th:src="@{/js/jquery.autosize.min.js}"></script>
	<script type="text/javascript">
		$(function(){
            $('#nlValueStart1').ace_spinner({value:Number($("#nlValueStart1").val()), min:0,max:99,step:1, btn_up_class:'btn-info', btn_down_class:'btn-info'})
				.on('change', function(){});
			$('#nlValueEnd1').ace_spinner({value:Number($("#nlValueEnd1").val()), min:0,max:99,step:1, btn_up_class:'btn-info', btn_down_class:'btn-info'})
				.on('change', function(){});
            $('#nlValueStart2').ace_spinner({value:Number($("#nlValueStart2").val()), min:0,max:99,step:1, btn_up_class:'btn-info', btn_down_class:'btn-info'})
                .on('change', function(){});
            $('#nlValueEnd2').ace_spinner({value:Number($("#nlValueEnd2").val()), min:0,max:99,step:1, btn_up_class:'btn-info', btn_down_class:'btn-info'})
                .on('change', function(){});
            $('#nlValueStart3').ace_spinner({value:Number($("#nlValueStart3").val()), min:0,max:99,step:1, btn_up_class:'btn-info', btn_down_class:'btn-info'})
                .on('change', function(){});
            $('#nlValueEnd3').ace_spinner({value:Number($("#nlValueEnd3").val()), min:0,max:99,step:1, btn_up_class:'btn-info', btn_down_class:'btn-info'})
                .on('change', function(){});
            $('#nlValueStart4').ace_spinner({value:Number($("#nlValueStart4").val()), min:0,max:99,step:1, btn_up_class:'btn-info', btn_down_class:'btn-info'})
                .on('change', function(){});
            $('#nlValueEnd4').ace_spinner({value:Number($("#nlValueEnd4").val()), min:0,max:99,step:1, btn_up_class:'btn-info', btn_down_class:'btn-info'})
                .on('change', function(){});

			$("#btnmore").click(function(){
                var table = $("#table");
				//$("#table").toggle();
				if(table.is(":hidden")){
                    table.show();
					$("#more").attr("class", "icon-arrow-up");
				}else{
					$("#more").attr("class", "icon-arrow-down");
                    table.hide();
				}
				return false;
			});
		});
		function view(qdId){
			document.form.action="/foot/footPerson/view?id=" + qdId;
			document.form.submit();
		}
		</script>
	</body>
</html>
